<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我要点评 - 爽客网</title>
<%@include file="../common/js.jsp" %>
<%@include file="../common/jspcommon.jsp" %>
<%@include file="../common/css.jsp" %>
<link href="../../css/other.css" type="text/css" rel="stylesheet" />
<link href="css/pager.css" type="text/css" rel="stylesheet" />
<script src="js/jquery.ying.js" type="text/javascript"></script>

<!--[if ie 6]><script src="../js/common/iepng.js" type="text/javascript"></script><![endif]-->
<!--[if ie 6]><link href="../../css/jrIE6.css" type="text/css" rel="stylesheet"><![endif]-->
<!--[if ie]><link href="../../css/jrIE.css" type="text/css" rel="stylesheet"><![endif]-->
</head>

<body>
	<!-- head -->
	<%@include file="../common/header.jsp" %>
    <!-- header-->

	<div class="wrap">
    	<div class="i_container">
        	<!-- left-->
            <div class="i_left">
            	<div class="title">
                	<h1><img src="../../images/smallpic/icon_13.gif" class="mr15"  /><span><i class="ml5 mr5 clrc06 fb farial"></i><i class="ml5 mr5 clrc06 fb farial"></i></span></h1>
                    <a href="#" class="i_link_s1"></a>
                    <ul class="tabs">
                    	<li class="current" onclick="scenicShow();">景点</li>
                        <li onclick="hotelShow();">酒店</li>
                    </ul>
                </div>
                <div class="search_box">
                	<p>
                    	<input type="text" class="txt_box" id="searchText"/>
                        <input type="button" class="sub_btn" id="scenicButton" onclick="scenicSearch();"/>
                        <input type="button" class="sub_btn" style="display: none;" id="hotelButton"  onclick="hotelSearch();"/>
                    </p>
                </div>
                <div class="search_list">
                	<h2 class="tip"  id="scenicName">请输入景点名称.</h2>
                	<h2 class="tip" style="display: none;" id="hotelName">请输入酒店名称.</h2>
                    <div class="list_info" id="searchList">
                    	<ul>
					      <c:forEach items="${searchModle.list}" var="list">
	                        	<li>
	                            	<input type="radio" name="RadioGroup1" value="${list.id}" id="RadioGroup1_0" /><span>${list.name}</span>
	                            </li>
                            </c:forEach>
                        </ul>
                       
                        <p>
                        	<input type="button" value="写点评" class="button" onclick="disCmt();"/>
                        </p>
                    </div> 
                </div>
                 <c:if test="${searchModle.totalPage>1 }"><div id="page" class="h_page"></div></c:if>
            </div>
            <!--left--end-->
        </div>	
    </div>        
    
        <!-- help-->
         <div class="w980 mg box_style1">
        	<c:forEach items="${help }" var="c">
        		${c.content}
        	</c:forEach>
        </div>
        <!-- help--end-->
        
    </div>
    <!-- content--end-->
    <!-- foot-->
    <%@include file="../common/footer.jsp" %>
    <!-- foot--end-->
    <script type="text/javascript">
    $(function(){
    	$("#page").pager({
        	pagenumber : '${searchModle.currentPage}',
        	pagecount : '${searchModle.totalPage}',
        	buttonClickCallback : function(page) {
        		window.location.href = "findDis.htm?page="+page+"&obj=${obj}"+"&title=${title}";
        	}
        });
    });
    
    
    	function scenicShow(){
    		$("#scenicButton").show();
    		$("#scenicName").show();
    		$("#hotelButton").hide();
    		$("#hotelName").hide();
    	}
    	function hotelShow(){
    		$("#scenicButton").hide();
    		$("#scenicName").hide();
    		$("#hotelButton").show();
    		$("#hotelName").show();
    	}
    	function hotelSearch(){
    		var title =$("#searchText").val();
    		window.location.href="findDis.htm?title="+title+"&obj=hotel";
    	}
		function scenicSearch(){
			var title =$("#searchText").val();
			window.location.href="findDis.htm?title="+title+"&obj=scenic";
    	}
		function disCmt(){
			if(COOL.checkLogin()){ 
				var id = $(":radio[name='RadioGroup1'][checked]").val();
				window.location.href="disCmt.htm?id="+id+"&ot=${obj}";
			 }else{ 
				COOL.memberLogin();
			 } 
		}
    </script>
</body>
</html>
